package jpf.nextsearch.ds.model.types;

/**
 * @author <a href="mailto:jacek.pruszkowski@gmail.com">Jacek Pruszkowski</a>
 */
public enum ResourceType {
	MOVIE(0), MUSIC(1);

	private int value;

	private ResourceType(int value) {
		this.value = value;
	}

	public static ResourceType fromInt(int value) {
		for (ResourceType v : ResourceType.values()) {
			if (v.toInt() == value) {
				return v;
			}
		}
		return null;
	}

	public int toInt() {
		return value;
	}

}
